package com.jincp.common.model;


import android.graphics.Color;
import android.support.annotation.DrawableRes;
import android.support.annotation.StringRes;
import android.view.Gravity;

import com.jincp.common.R;
import com.jincp.common.utils.UIUtils;

import java.io.Serializable;

/**
 *
 * Created by hzxuwen on 2016/6/16.
 */
public class ToolBarOptions implements Serializable{

    public static int DEFAULT_NAVIGATE_ICON_RESOURCE = R.drawable.icon_back_default;

    public static void setDefaultNavigateIconResource(@DrawableRes int navigateIconResource){
        ToolBarOptions.DEFAULT_NAVIGATE_ICON_RESOURCE = navigateIconResource;
    }

    /**
     * toolbar的title
     */
    public String titleString;
    /**
     * toolbar的title的Gravity
     */
    public int titleGravity = Gravity.CENTER;
    /**
     * toolbar的title的颜色
     */
    public int titleColor = Color.BLACK;
    /**
     * toolbar的logo资源id
     */
    public int logoId = 0;
    /**
     * toolbar的返回按钮资源id，默认开启的资源icon_back
     */
    public int navigateId = DEFAULT_NAVIGATE_ICON_RESOURCE;
    /**
     * toolbar的背景色
     */
    @DrawableRes
    public int backgroundResource = R.drawable.rect_white;

    public ToolBarOptions() {
        this("");
    }

    public ToolBarOptions(@StringRes int titleId) {
        this(UIUtils.getString(titleId));
    }

    public ToolBarOptions(String titleString) {
        this.titleString = titleString;
    }

}
